home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / comms / other / micq-0.4.0 / icq091.txt < prev    next >
Text File  |  1999-05-14  |  38KB  |  786 lines

  1. NOTE !!!! : Magnus Ihse is NOT the author of MICQ!!!!!!!!!!!!!!!!!
  2. do NOT send him questions about Micq send them the meadhros@yahoo.com thank
  3. you.
  4.  
  5. ########################
  6. ##  THE ICQ PROTOCOL  ##
  7. ########################
  8.  
  9. Version 0.91
  10. Last update 12 April 1998
  11. (Minor update 11 May 1998)
  12. Created by Magnus Ihse (d95-mih@nada.kth.se)
  13. Copyright © 1998
  14.  
  15. The home page of this specification is
  16. http://www.student.nada.kth.se/~d95-mih/icq/
  17. To participate in the mailing list icq-devel, send a mail to
  18. majordomo@tjsgroup.com, with the message body consisting only of the
  19. line "subscribe icq-devel".
  20.  
  21. About this document
  22. -------------------
  23. Please note: I am in no way affiliated with Mirabilis. This is an unofficial
  24. specification, based solely on TCP/UDP packet traces and my own guesswork. 
  25. This means that the information in here might be (and probably _will_ be
  26. :-)) incorrect. It also means that even _if_ some parts of this specification
  27. _is_ correct, they may change at any moment due to the Divine Will of 
  28. Mirabilis.
  29.  
  30. I am a computer science student at the Royal Institute of Technology in
  31. Sweden, and this is a hobby project - something I have been doing in my 
  32. free time (i.e., late in the nights :-)). This means that I don't have 
  33. much time to spend on updating this document.
  34.  
  35. Recently I have received a lot of requests for this document, and many
  36. persons have offered to help me complete and correct it. I am very thankful
  37. for such help, and all contributions will of cource receive proper credit.
  38. Otherwere in this document is described in more detail what you can do to
  39. help, and how you should do it.
  40.  
  41. Legal information
  42. -----------------
  43. Aa far as I can tell (but I am not a laywer), the way I have extracted
  44. this information complies with Mirabilis License agreement, which states:
  45. "You agree not to reverse engineer, decompile or disassemble the software." 
  46. I have not reverse engineered, decompiled or disassembled the software
  47. (i.e. Mirabilis ICQ client) to get this information. I have only been
  48. looking at the TCP and UDP packets send out from, and received by, my
  49. computer.
  50.  
  51. If you are a Mirabilis employee, and you feel that this document still
  52. violates the Licence agreement, or if you on other grounds think that
  53. this document is dubious - please contact me as soon as possible!
  54. (My e-mail address given at top of this document.)
  55.  
  56.  
  57. Copyright
  58. ---------
  59. This document is protected under internation copyright law. You may
  60. not modify this document. You may, however, make an unlimited number
  61. of copies of this document, as long as it is kept intact. You may
  62. freely distribute this document electronically (on the Internet or 
  63. otherwise) or on paper.
  64.  
  65. Any trademarks mentioned in this text belongs to their respective owner.
  66.  
  67. Disclaimer
  68. ----------
  69. LICENSE AGREEMENT
  70.  
  71. This document and the information present herein is provided by Magnus Ihse
  72. ("the Author") for your personal use only. You agree to the full 
  73. responsibility for the results of your use of this document or the information 
  74. present herein.
  75.  
  76. By using this document or the information present herein, you accept
  77. the terms of this license agreement.
  78.  
  79. THIS INFORMATION IS PROVIDED ON AN "AS IS" BASIS. THE AUTHOR MAKES NO 
  80. WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THOSE OF 
  81. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THIS 
  82. DOCUMENT AND THE INFORMATION PRESENT HEREIN. THE AUTHOR DOES NOT WARRANT, 
  83. GUARANTEE OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF 
  84. THE USE OF THIS DOCUMENT OR THE INFORMATION PRESENT HEREIN, IN TERMS OF THE 
  85. ACCURACY, RELIABILITY, QUALITY, VALIDITY, STABILITY, COMPLETENESS, 
  86. CURRENTNESS, OR OTHERWISE. THE ENTIRE RISK OF USING THE INFORMATION PRESENT 
  87. IN THIS DOCUMENT IS ASSUMED BY THE USER.
  88.  
  89. IN NO EVENT WILL THE AUTHOR BE LIABLE TO ANY PARTY (i) FOR ANY DIRECT, 
  90. INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, 
  91. BUT NOT LIMITED TO, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS 
  92. INTERRUPTION, LOSS OF PROGRAMS OR INFORMATION, AND THE LIKE), OR ANY OTHER 
  93. DAMAGES ARISING IN ANY WAY OUT OF THE AVAILABILITY, USE, RELIANCE ON, OR 
  94. INABILITY TO USE THIS DOCUMENT OR THE INFORMATION PRESENT HEREIN, EVEN IF 
  95. THE AUTHOR HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, AND 
  96. REGARDLESS OF THE FORM OF ACTION, WHETHER IN CONTRACT, TORT, OR OTHERWISE; 
  97. OR (ii) FOR ANY CLAIM ATTRIBUTABLE TO ERRORS, OMISSIONS, OR OTHER 
  98. INACCURACIES IN, OR DESTRUCTIVE PROPERTIES OF ANY INFORMATION.
  99.  
  100. Writing an ICQ clone
  101. --------------------
  102. Since the public release of this document, at least two different ICQ clones
  103. have been created. They are at the time of writing very much under 
  104. development, but are at least partly functioning. :-) More information can
  105. be found on my web page, or through the icq-devel mailing list.
  106. (For web page URL or subscription information, see top of this document.)
  107.  
  108. What needs to be done
  109. ---------------------
  110. The worst deficiency of this document is the lack of information about 
  111. version 3 and version 4 of the protocol. These versions are used by ICQ98
  112. (older beta versions of ICQ98 seems to have used only version 3, the latest
  113. version as of today seems to use both version 3 and version 4). This document
  114. only describes version 2 of the protocol, which was used by versions up to
  115. but not including ICQ98 (I think v1.113 was the latest version of ICQ using 
  116. version 2 of the protocol). Note that the ICQ version numbers refer to the
  117. Windows 95/NT version of ICQ. I think that the Mac and Java version still
  118. uses version 2, but I haven't checked this (please correct me if I'm wrong!).
  119.  
  120. So, what's the difference between version 2 and 3/4? As far as I can tell,
  121. the major difference is that all packets in version 3/4 has some sort of 
  122. unique code attached to it. I think it is part of an anti-spoof scheme, but
  123. I am not sure. I have not been able to figure out how this code is generated,
  124. and I definitely need help on this. There are also minor changes in the 
  125. packet format. The basic structure still seems intact, however.
  126.  
  127. That this document doesn't cover version 3 and 4 doesn't mean that it can't
  128. be used for building an ICQ clone, however. Mirabilis servers still supports
  129. version 2 clients (or at least they did when I last checked). There is 
  130. reason to suspect that this might change some day, since the version 1
  131. clients have been phased out, and are not useable any more.
  132.  
  133. Furthermore are there some fields in the packets which I just couldn't figure
  134. out. You will find these marked "Unknown", and some typical value in the 
  135. Content column.
  136.  
  137. Many packet types are missing from this description for sure. If Mirabilis
  138. have used all multiples of 10 for their codes, there seem to be a lot of
  139. them missing. :-)
  140.  
  141. There is much about the peer-to-peer communication that still is not
  142. clear to me. (This protocol seems not to have changed in ICQ98, however.)
  143.  
  144. And finally, some of the features of ICQ have not even been addressed in this
  145. document. This includes file transfer and chat, but also some of the new
  146. features of ICQ98.
  147.  
  148. If you can help in filling any of these gaps, or correct the information
  149. given here, please do not hesitate to contact me! I'd prefer if you
  150. send an e-mail to d95-mih@nada.kth.se with subject "ICQ Update".
  151. (Please note! Sending an empty mail with the subject "ICQ Update" does
  152. NOT mean that I'll mail you a copy of the spec when it's updated! If
  153. you are interested in keeping up to date with the ICQ specification, please
  154. join the mailing list instead.)
  155.  
  156. Introduction
  157. ------------
  158. Communication with persons online is done through a direct TCP connection
  159. to that person. All other communication is done through UDP packets sent to
  160. the ICQ server. All UDP packets must be acknowledged by the receiver.
  161. Retransmission will occur in 10 seconds if a acknowledgement is not
  162. received. After 6 unsuccessfull transmissions, a B_MESSAGE_ACK message will
  163. be sent. The whole procedure is repeated 2 times. If there is still no
  164. reply, the ICQ client will assume the user to be disconneced.
  165.  
  166. Before any communication between users can take place, the client must
  167. register at the server by logging in. During the login process, the client
  168. sen